#pragma once

#include "XtStruct.h"
typedef void(*ORDER)(const COrdinaryOrder& orderInfo, int nRequestId, const char* moduleTag);
typedef void (*testStockOrder)(const CAccountDetail& account, int nRequestId);
typedef  void(*CANCELACTION)(const char* accountKey, const long long nTaskId, const long long nGroupId, int nRequestId, const char* moduleTag);


typedef  void(*SUBDEAL)(const char* accountKey, int nRequestId, const char* moduleTag);
typedef  void(*SUBRTNORDER)(const char* accountKey, int nRequestId, const char* moduleTag);
typedef  void(*SUBACCOUNT)(const char* accountKey, int nRequestId, const char* moduleTag);





ORDER xt_order;
testStockOrder testf;
CANCELACTION cancel_order;

SUBDEAL sub_deal;
SUBRTNORDER sub_rtnorder;
SUBACCOUNT sub_acct;


void SetOrder(ORDER cb) {

	xt_order = cb;
}


void SetOrderTest(testStockOrder cb) {

	testf = cb;
}

void SetCancelOrder(CANCELACTION cb) {

	cancel_order = cb;
}

void SetSubDeal(SUBDEAL cb) {

	sub_deal = cb;
}
void SetSubRtnOrder(SUBRTNORDER cb) {

	sub_rtnorder = cb;
}
void SetSubAcct(SUBACCOUNT cb) {

	sub_acct = cb;
}
